﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="info_detail.aspx.cs" Inherits="admin_infomation_info_detail"
    ValidateRequest="false" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>文章信息 </title>
    <link href="../css/default.css" rel="stylesheet" type="text/css" />

    <script src="../js/jUtility.js" type="text/javascript"></script>

    <script type="text/javascript" src="../common/calendar.js"></script>

    <script type="text/javascript" src="../../fckeditor/fckeditor.js"></script>
    <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript">
        window.onload = function() {
            if (document.getElementById("content")) {
                var fck = new FCKeditor('content');
                fck.BasePath = "../../fckeditor/";
                fck.Width = "99%";
                fck.Height = "600px"
                fck.ReplaceTextarea();
            }

            //initTextarea("concact");
        }
        function initTextarea(id) {
            if (document.getElementById(id) && document.getElementById(id).style.display != 'none') {
                var fck2 = new FCKeditor(id);
                fck2.BasePath = "../../fckeditor/";

                fck2.Width = "99%";
                fck2.Height = "200px"
                fck2.ReplaceTextarea();
            }
        }
    </script>

</head>
<body>
    <table width="100%" height="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
            <td height="414" align="left" valign="top" class="rightbg">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td height="2" bgcolor="#A49B81">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="25" background="../images/position_bg.gif" bgcolor="#EEF6FE" class="subnav"
                                        style="background-repeat: repeat-y; background-position: left; padding-left: 6px;
                                        padding-top: 3px;">
                                        <asp:Label ID="headers" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="1" bgcolor="#B0C9E8">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="16">
                        </td>
                    </tr>
                    <tr>
                        <td>
                        &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top" style="padding-left: 10px;">
                            <form id="form1" method="post" runat="server">
                            <asp:HiddenField ID="state" runat="server" />
                            <asp:HiddenField ID="aid" runat="server" />
                            <asp:HiddenField ID="isstaticpub" runat="server" />
                            <asp:HiddenField ID="ordernum" runat="server" />
                            <table width="95%" height="728" border="1" align="center" cellpadding="0" cellspacing="0"
                                bordercolorlight="#2583BC" bordercolordark="#ffffff">
                                <tr>
                                    <td width="100%" height="641" valign="top">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <th align="left" width="80%">
                                                    <asp:Label ID="infoname" runat="server"></asp:Label>
                                                </th>
                                                <th align="left">
                                                    <a href="info_list.aspx?layerid=<%=Layerid %>&columnid=<%=Request.Params["columnid"]%>">
                                                        返回 </a>
                                                </th>
                                            </tr>
                                        </table>
                                        <br>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td width="7%" align="right">
                                                    <font color="#FF0000">* </font>标题：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="title" runat="server" MaxLength="100" size="50" />
                                                </td>
                                            </tr>
                                            <tr id="Tr_subtitle" runat="server" visible="false">
                                                <td width="7%" align="right">
                                                    <font color="#FF0000"></font>副标题1：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="subtitle" runat="server" MaxLength="100" size="50" />
                                                </td>
                                            </tr>
                                            <tr id="Tr_subtitle2" runat="server" visible="false">
                                                <td width="7%" align="right">
                                                    <font color="#FF0000"></font>副标题2：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="subtitle2" runat="server" MaxLength="100" size="50" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td  align="right">
                                                    作者：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    
                                                    <asp:TextBox ID="author" runat="server" MaxLength="50" size="36" />
                                                    <asp:HiddenField ID="expertid" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td  align="right">
                                                    <font color="#FF0000"></font>发布日期：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="startDate" runat="server" MaxLength="10" size="15" onClick="fPopCalendar(startDate,startDate);return false"
                                                        onkeydown="return false;" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" >
                                                    <font color="#FF0000">* </font>内容模版：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList runat="server" ID="templateId">
                                                        <asp:ListItem Text="--请选择--" Value="0" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                          
                                            <tr style="display:none;" >
                                                <td align="right" >
                                                    <font color="#FF0000"></font>相关业务：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:DropDownList runat="server" ID="buslist">
                                                        <asp:ListItem Text="--请选择--" Value="0" />
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                   
                                            <tr>
                                                <td  align="right">
                                                    内容类型：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:RadioButtonList RepeatDirection="Horizontal" RepeatLayout="Flow" AutoPostBack="true"
                                                        ID="articletype" runat="server" OnSelectedIndexChanged="articletype_SelectedIndexChanged">
                                                        <asp:ListItem Text="文章" Value="1" Selected="True" />
                                                        <asp:ListItem Text="链接" Value="2" />
                                                        <asp:ListItem Text="下载文件" Value="3" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0" id="link" visible="false" runat="server">
                                            <tr>
                                                <td align="right" width="7%">
                                                    <font color="#FF0000">* </font>链接地址：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="linkpath" size="50" MaxLength="100" runat="server" Text="http://" />
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0" id="down" visible="false" runat="server">
                                            <tr>
                                                <td align="right" width="7%">
                                                    <font color="#FF0000">* </font>文件上传：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:HiddenField ID="filedown" runat="server" />
                                                    <iframe name="fu" id="fu" frameborder="0" width="100%" height="25" scrolling="no"
                                                        src="../common/upload.aspx?fildname=filedown&uptype=file"></iframe>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%" border="0" id="con" runat="server" visible="true">
                                            <tr>
                                                <td width="7%" align="right">
                                                    来源：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="source" runat="server" MaxLength="255" size="50" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td  align="right">
                                                    来源链接：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="sourceurl" runat="server" MaxLength="255" size="50" />
                                                </td>
                                            </tr>
                                            
                                            <tr>
                                                <td align="right" >
                                                    <font color="#FF0000"> </font>内容：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:TextBox ID="content" TextMode="MultiLine" Rows="7" Columns="50" runat="server" />
                                                </td>
                                            </tr>
                                            <tr runat="server" visible="false" id="titleimgtr">
                                                <td align="right">
                                                    <font color="#FF0000"></font>题头图：
                                                    <asp:HiddenField ID="titleImg" runat="server" />
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <iframe name="ad" frameborder="0" width="100%" height="25" scrolling="no" src="../common/upload.aspx?fildname=titleImg">
                                                    </iframe>
                                                </td>
                                            </tr>
                                            <tr id="contag" runat="server" visible="false">
                                                <td  align="right">
                                                    标签：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <a name="tagpos"></a>
                                                    <asp:HiddenField ID="tag" runat="server" />
                                                    <asp:TextBox ID="tagname" runat="server" MaxLength="200" size="50" onkeydown="return false;" />
                                                    <input type="button" value="选择" onclick="javascript:winOpen('label_select.aspx?tag='+document.getElementById('tag').value,'templet','500','330')" />
                                                    <asp:Button Text="获取" runat="server" OnClick="autotag_onclick" ID="tag_auto_btn" />
                                                </td>
                                            </tr>
                                            <tr visible="false">
                                                <td align="right" valign="top" >
                                                    简介：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="summary" TextMode="MultiLine" Rows="7" Columns="50" runat="server" />
                                                </td>
                                            </tr>
                                            <tr id="consubsidiary" runat="server" visible="false">
                                                <td  align="right">
                                                    相关业务：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:HiddenField ID="subsidiary" runat="server" />
                                                    <asp:TextBox ID="txtsubsidiary" runat="server" MaxLength="200" size="50" onkeydown="return false;" />
                                                    <input type="button" value="选择" onclick="javascript:winOpen('subsidiary_select.aspx?subsidiary='+document.getElementById('subsidiary').value,'templet','500','330')" />
                                                </td>
                                            </tr>
                                            <tr id="Tr_brands" runat="server" visible="false">
                                                <td  align="right">
                                                    品牌：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:HiddenField ID="brands" runat="server" />
                                                    <asp:TextBox ID="brandnames" runat="server" MaxLength="255" size="50" onkeydown="return false;" />
                                                    <input type="button" value="选择" onclick="javascript:winOpen('brand_select.aspx?brands='+document.getElementById('brands').value,'templet','500','330')"  />
                                                </td>
                                            </tr>
                                            <tr id="Tr_products" runat="server" visible="false" >
                                                <td  align="right">
                                                    产品：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:HiddenField ID="products" runat="server" />
                                                    <asp:TextBox ID="productnames" runat="server" MaxLength="255" size="50" onkeydown="return false;"/>
                                                    <input type="button" value="选择" onclick="javascript:winOpen('product_select.aspx?products='+document.getElementById('products').value,'templet','500','330')"  />
                                                </td>
                                            </tr>
                                            <tr id="Tr_concact" runat="server" visible="false">
                                                <td align="right" valign="top">
                                                    联系信息：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:HiddenField ID="concacts" runat="server" />
                                                    <asp:TextBox ID="concact" size="50" onkeydown="return false;"  runat="server" />
                                                    <input type="button" value="选择" onclick="javascript:winOpen('article_select.aspx?concacts='+document.getElementById('concacts').value,'templet','500','330')"  />
                                                </td>
                                            </tr>
                                                                                        
                                        </table>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td align="right" width="7%">
                                                    首页置顶：
                                                </td>
                                                <td width="2%">
                                                    &nbsp;
                                                </td>
                                                <td width="75%">
                                                    <asp:RadioButtonList runat="server" ID="indextop" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                        <asp:ListItem Text="是" Value="1" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    栏目置顶：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList runat="server" ID="sorttop" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        <asp:ListItem Text="否" Value="0" Selected="True" />
                                                        <asp:ListItem Text="是" Value="1" />
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                            <tr id="cms_mores">
                                                <td align="right">
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <%=moreshtml %>
                                            <%--
                                            <tr>
                                                <td align="right"> 新增输入项</td>
                                                <td></td>
                                                <td>name: <input id="pname" name="pname" type="text" size="10" /> <input type="button" value="添加" onclick="addinput();" /> (字母加数字)</td>
                                            </tr> --%>
                                        </table>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td height="54" colspan="3" align="center">
                                                    <asp:Button Text="保存为草稿" ID="sub1" OnClientClick="return subfunc(4)" runat="server"
                                                        OnClick="Sub_click" />
                                                    <asp:Button Text="保存为正稿" ID="sub2" OnClientClick="return subfunc(0)" runat="server"
                                                        OnClick="Sub_click" />
                                                    <asp:Button Text="审核通过" ID="sub5" OnClientClick="return subfunc(2)" runat="server"
                                                        OnClick="Audi_click" />
                                                    <asp:Button Text="审核未通过" ID="sub4" OnClientClick="return subfunc(3)" runat="server"
                                                        OnClick="Audi_click" />
                                                    <asp:Button Text="保存并发布" ID="sub3" OnClientClick="return subfunc(1)" runat="server"
                                                        OnClick="Sub_click" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            </form>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <iframe id="wait2" name="wait2" style="display: none" width="100%" height="100%"
        src="../images/wait.gif" frameborder='0' align='middle' bgcolor='#FFFFFF'></iframe>

    <script type="text/javascript"> 

		var o;
		
		function subfunc(flag) {
			if(!isFilled(form1.title)){
				return warning('title','标题不能为空!');
			}
			
			
			if(form1.templateId.value == "0"){
				alert("请选择模板!");
				form1.templateId.focus();
				return false;
			}
			
			if(form1.articletype[0].checked == true){
			    /*var oEditor1= FCKeditorAPI.GetInstance('content');
	            
	            if(strLen(oEditor1.GetHTML())==0){
		            //return warning('nkey','内容不能为空!');
		            alert("内容不能为空!"); 
		            oEditor1.SetHTML( '' ) ; 
		            return false;
	            }*/
	            
			}else if(form1.articletype[2].checked == true){
			    if(form1.filedown.value == ""){
			        alert("请上传文件!");
			        return false;
			    }
			}else if(form1.articletype[1].checked == true){
			    if(!IsURL(form1.linkpath.value)){
			        alert("请输入合法有链接地址!");
			        form1.linkpath.focus();
			        return false;
			    }
			}
			
			
			form1.state.value = flag;
			
			return true;	
		}
		function warning(FieldName,WarningString){
				alert(WarningString);
				eval("form1." + FieldName + ".focus();");
				return(false);
		}
		function stag(){
		    
		    return true;
		}
		function addinput() {
		    var pname = $("#pname").val();
		    if (pname == "") {
		        alert("请输入添加内容的名称！");
		        return false;
		    }
		    $("#pname").val('');
		    $("#cms_mores").after("<tr><td align=\"right\">" + pname + "：</td><td></td><td><textarea name=\"_cmsinfomore_" + pname + "\" rows=\"7\" cols=\"50\" id=\"_cmsinfomore_" + pname + "\"></textarea></td></tr>");
		}
    </script>

</body>
</html>
